<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /* 
            一元运算符
            +
            -：对数字进行负号的取反

            对于非number类型的值先转为number，然后再运算
         */
         var a=123;
         a=-a;
         a=true;
         a=-a;
         console.log("a="+a);
    </script>
</head>
<body>
    
</body>
</html>